package aiku.numericalcontroloa.Controller.Work;

import aiku.numericalcontroloa.Base.Utils.Result;
import aiku.numericalcontroloa.Model.Entity.WorkSummary;
import aiku.numericalcontroloa.Service.Impl.WorkSummaryServiceImpl;
import aiku.numericalcontroloa.Service.WorkSummaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 马文杰
 * @version 1.0
 */
@RestController
@RequestMapping("/workSum")
public class WorkSummaryController {
    @Autowired
    private WorkSummaryServiceImpl workSummaryService;

    /**
     * 给自己添加工作记录
     */
    @PostMapping("/addWorkSummary")
    public Result addWorkSummary(@RequestBody WorkSummary workSummary) {
        return workSummaryService.addWorkSummary(workSummary);
    }

    /**
     * 查询工作列表
     */
    @PostMapping("/selectWorkSummaryList")
    public Result selectWorkSummaryList() {
        return workSummaryService.selectWorkSummaryList();
    }




}
